﻿using JoceLinItemDemo.Domain.ExamineMessage;
using JoceLinItemDemo.Domain.LoginInfo;
using JoceLinItemDemo.Domain.UserInfoMessage;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace JoceLinItemDemo.EntityFrameworkCore
{
    [ConnectionStringName("sqlserver")]
    public class MyContext : AbpDbContext<MyContext> 
    {
        //表示上下文中给定类型的所有实体的集合或可从数据库中查询的给定类型的所有实体的集合.代表一个实体集,用于创建、读取、更新和删除操作
        public DbSet<UserInfoMe> UserInfoMe { get; set; }
        public DbSet<LoginUser> LoginUser { get; set; }
        public DbSet<LeaveExamine> LeaveExamine { get; set; } 
        public MyContext(DbContextOptions<MyContext> options) : base(options)
        {
            
        }
        /// <summary>
        /// 创建表是，设置表的信息，字段约束
        /// </summary>
        /// <param name="modelBuilder"></param>
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
